<?php

namespace App\Jobs\RongCloud;

use App\Jobs\Job;

class RoomPushJob extends Job
{
    public $senderId;

    public $targetId;

    public $content;

    public $type;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct($senderId, $targetId, $content, $type = 'RC:CmdMsg')
    {
        $this->senderId = $senderId;
        $this->targetId = $targetId;
        $this->content = $content;
        $this->type = $type;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        /**
         * @var $rcService \App\Services\Tools\RongCloudService
         */
        $rcService = app('rongcloud');
        $res = $rcService->roomPush($this->senderId, $this->targetId, $this->content, $this->type);
//       dump($this->senderId, $this->targetId);
//       dump($res, $this->content);
    }
}
